Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(theme): add stylesheetId and scope options #20789

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

DerYeger
Copy link

@DerYeger DerYeger commented Dec 18, 2024

Description

This PR adds two new optional properties to ThemeOptions that enable a conflict-free usage of multiple Vuetify instances, e.g., in an app with microfrontends using Vuetify with different themes.

  • stylesheetId: Customizable id for generated <style> element to allow for multiple Vuetify instances accros microfrontends.
  • scope: Customizable scope for classes in generated <style> element.

closes #4065

@DerYeger DerYeger changed the title feat: customizable stylesheet id and custom selector prefix feat: implement custom style id and selector prefix Dec 18, 2024
@DerYeger DerYeger force-pushed the microfrontend-style-conflicts branch 2 times, most recently from 80ffa18 to 754f897 Compare December 18, 2024 15:16
@KaelWD
Copy link
Member

KaelWD commented Dec 19, 2024

Maybe call it scope instead of prefix and always use :where, then we can switch to @scope when browser support improves?

@KaelWD KaelWD linked an issue Dec 19, 2024 that may be closed by this pull request
@DerYeger DerYeger force-pushed the microfrontend-style-conflicts branch from 754f897 to c2f7652 Compare December 19, 2024 07:18
@DerYeger DerYeger changed the title feat: implement custom style id and selector prefix feat: implement custom stylesheet id and theme scope Dec 19, 2024
@DerYeger
Copy link
Author

Maybe call it scope instead of prefix and always use :where, then we can switch to @scope when browser support improves?

Sounds good to me! I pushed this change and updates the docs.

@DerYeger DerYeger force-pushed the microfrontend-style-conflicts branch from c2f7652 to d2fb876 Compare December 19, 2024 07:21
@KaelWD KaelWD added this to the v3.8.0 (Andromeda) milestone Jan 6, 2025
@KaelWD KaelWD changed the title feat: implement custom stylesheet id and theme scope feat(theme): add stylesheetId and scope options Jan 6, 2025
@KaelWD KaelWD merged commit 794a2e6 into vuetifyjs:dev Jan 6, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Add option to scope vuetify-theme-stylesheet styles
2 participants